// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_settings
// * CreateDate    : 2014-06-05 18:30:01
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:01
// * LastChanger   : 2014-06-05 18:30:01
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmSettingsEntity : EntityBase
    {
        public HmSettingsTable TableSchema
        {
            get
            {
                return HmSettingsTable.Current;
            }
		}
		
		public HmSettingsEntity()
        {

        }
		
		public HmSettingsEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Settingid = Convert.ToInt32(CommonFunctions.ToObject(dr["settingid"]));
			this.Settingname = Convert.ToString(CommonFunctions.ToObject(dr["settingname"]));
			this.Settingstring = Convert.ToString(CommonFunctions.ToObject(dr["settingstring"]));
			this.Settinginteger = Convert.ToInt32(CommonFunctions.ToObject(dr["settinginteger"]));
        }
		
		public HmSettingsEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Settingid = Convert.ToInt32(CommonFunctions.ToObject(dr["settingid"]));
			this.Settingname = Convert.ToString(CommonFunctions.ToObject(dr["settingname"]));
			this.Settingstring = Convert.ToString(CommonFunctions.ToObject(dr["settingstring"]));
			this.Settinginteger = Convert.ToInt32(CommonFunctions.ToObject(dr["settinginteger"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmSettingsTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Settingid
        {
            get { return Convert.ToInt32(GetData(HmSettingsTable.C_settingid)); }
            set { SetData(HmSettingsTable.C_settingid, value); }
        }
		
        [DataMember]
        public string Settingname
        {
            get { return Convert.ToString(GetData(HmSettingsTable.C_settingname)); }
            set { SetData(HmSettingsTable.C_settingname, value); }
        }
		
        [DataMember]
        public string Settingstring
        {
            get { return Convert.ToString(GetData(HmSettingsTable.C_settingstring)); }
            set { SetData(HmSettingsTable.C_settingstring, value); }
        }
		
        [DataMember]
        public int Settinginteger
        {
            get { return Convert.ToInt32(GetData(HmSettingsTable.C_settinginteger)); }
            set { SetData(HmSettingsTable.C_settinginteger, value); }
        }
		
		#endregion
	}
	
	
}	

